package ForEach;

public class NestedForEach {
	public static void main(String[] args) {
		// 2D arrary 
		int twoDArray [][] = {{1,2,3,4,5} ,{6,7,8,9,10}};
		// iterating  every element the twoDArray using foreach loop
		for(int[] oneDArrary : twoDArray){
			System.out.println("[");
			for ( int i : oneDArrary ){
				System.out.println(i+"\t");
			}
			System.out.println("]");
		}
	}

}
